Rates of Change

A rate indicates how one quantity varies in relation to another.

Your rate of pay ($/hr) tells us how the amount of money you get varies with the hours you work.
An interest rate (% p.a.) tells us how much interest you earm (or pay) depending on how long you loan it.
Speed (m/s) tells us how distance varies in relation to time.

A key clue that you are dealing with a rate is the word “per” in the units: i.e. metres per second, interest per annum or dollars per hour.

The rate of change is simply another way of talking about a rate. A car travelling at a rate of 10 m/s has a rate of change of 10 m/s. They mean the same thing.

Constant Rate of Change

A constant rate of change is when there is a linear relationship between the two quantities being considered.

For example, rate of pay ($/hr):

Row[{Plot[20x,{x,0,10},ImageSize-> 400,Epilog-> {Red, Dashed,Line[{{3,0},{3,60}}],Line[{{0,60},{3,60}}],Line[{{6,0},{6,120}}],Line[{{0,120},{6,120}}]}],Column[{"For every hour you work you get $20.","If you work 3 hours you get $60,","6 hours you get $120 and so on...","","Your rate of pay remains constant at $20/hr."}]}]

This constant rate is also the gradient of the line. This is an important concept, the rate of change and the gradient are the same thing.

({{({{Gradient: m=(rise/run)}, {=(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))}, {=((120-60)/(6-3))}, {=(60/3)}, {=20}})}})

So, for a constant rate of change we simply determine the gradient of the linear equation to find the rate of change.

Variable Rate of Change

A variable rate of change (RoC) is when there is a non-linear relationship between the two quantities being considered.

Row[{Plot[Piecewise[{{x,0<x<5},{-5+2x,5<x<10}}],{x,0,10},ImageSize-> 400],Plot[(Sqrt[x]),{x,0,10},ImageSize-> 400]}]

The first graph shown has a constant rate of change (RoC) from t = 0 to t = 5, and from t = 5 to t = 10, but has a variable RoC from t = 0 to t = 10.
The second graph shown has a variable RoC for all values.

For a situation involving a variable RoC we can consider either the average RoC or the instantaneous RoC.

Plot[-(((x-4))^2)+16,{x,0,8},Epilog-> {Red, Dashed,Line[{{2,12},{4,16}}],Line[{{4,20},{8,4}}],PointSize[Medium],Point[{2,12}],Point[{4,16}],Point[{6,12}]}]

Average Rate of Change

The average rate of change is the equivalent constant rate of change over a specified domain (i.e. between two points).

In the figure above we are determining the average RoC between (2, 12) and (4, 16):

({{({{Average RoC: m=(rise/run)}, {=(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))}, {=((16-12)/(4-2))}, {=(4/2)}, {=2}})}})

Demonstration

arctan[α_/;α ≥  0, b_]:= {0,ArcTan[α/b]};
arctan[α_/;α < 0,b_]:= {ArcTan[α/b],0};
Manipulate[
If[x0<#,x0=#]&[Switch[func,p2,-1.1,p3,-1.17,p4,-2.8,expf,.02,logisticf,0.01]];
If[x0>#,x0=#]&[Switch[func,p2,4.9,p3,3.9,p4,2.8,expf,8.8,logisticf,7]];


x1=x0 + deltax;
Switch[func,
p2,{xstart, xstop,ystart,ystop,  kchangesides,{koffsetleft,koffsetright},deltaxpos,xyinset} ={-2,6.1,-1,11,-0.9,{1.6,-0.6},-0.45,{4.5,10}};f =Function[x,-(x^2)+4x+5],
p3,{xstart, xstop,ystart,ystop,  kchangesides,{koffsetleft,koffsetright},deltaxpos,xyinset} ={-2,5,-5,21,-0.95,{1.,-0.5},-0.85,{3,18}};f =Function[x,(x^3) -6(x^2)+5 x+12],
p4,{xstart, xstop,ystart,ystop, kchangesides,{koffsetleft,koffsetright},deltaxpos,xyinset} ={-3,4.5,-1.5,1.5,-2,{1.,-0.6},-0.1,{1.6,1.1}};f =Function[x,(1/8) (x^4) -(x^2)+1],
expf,{xstart, xstop,ystart,ystop, kchangesides,{koffsetleft,koffsetright},deltaxpos,xyinset} ={-0.02,10,-0.1,2.7,1.5,{1.75,-0.8},-0.08,{7.5,2.3}};f =Function[x, 3x (E^(-0.5x))],
logisticf,{xstart, xstop,ystart,ystop, kchangesides,{koffsetleft,koffsetright},deltaxpos,xyinset} ={-0.02,8,-0.35,2.22,1.5,{1.60,-0.55},-0.1,{2.4,2.0}};f =Function[x, (2/(1+61(E^(-1.1x))))]];

xaddlength=(xstop-xstart)/10;
secant=Function[x,((f[x1]-f[x0])/( deltax))x+(( x1 f[x0]-x0 f[x1])/deltax)];
m=((f[x1]-f[x0])/( deltax));
λ = ((ystop-ystart)/(xstop-xstart)) /(1/GoldenRatio);


Plot[f[x],{x,xstart,xstop},PlotRange->{{xstart,xstop},{ystart,ystop}},ImageSize-> 500, AxesLabel-> {Style["x ",14,Italic],Style["y",14,Italic]},
PlotStyle->{RGBColor[0.378912, 0.742199, 0.570321],Thickness[.005] },
Epilog->{Black,
Arrowheads[.025],Arrow[{{xstop-0.02,0},{xstop,0}}],Arrow[{{0,ystop-0.02},{0,ystop}}],Red,PointSize[0.015],Disk[{x0,f[x0]},If[deltax>0.3,0.2,0.001]{1,λ},arctan[m,λ]],
Black,Line[{{ x0,f[x0] },{x1,f[x0]},{x1,f[x1]}}],
Text[Style["Δx",14,Bold],{x0+(x1-x0)/2,f[x0 ]+deltaxpos}],
Text[Style["Δy",Medium],{x1 +0.2,f[x0 ] + (f[x1]-f[x0])/2}],
Blue,Thickness[.005],Line[{{x0 -xaddlength,secant[x0 -xaddlength]},
{x1 +xaddlength,secant[x1 +xaddlength]}}],
Red,Point[{x0,f[x0]}],Point[{x1,f[x1]}],
Style[Inset[Row[{Style["m",Italic]," = ",
If[deltax> 0.0001,ToString[NumberForm[((f[x1]-f[x0])/( deltax)),{5,2}]],Style[Text["undefined"], Red,14]]}],If[x0<kchangesides,{ x0+koffsetleft,f[x0] },{ x0+koffsetright,f[x0] }]] ,14],
Style[Inset[HoldForm[Style["f(x)",Italic] = p]//.{p-> f[x]}, xyinset],20]} ],
{{func,p2,"functions"},{p2->"- (x^2) + 4 x + 5",
p3->" (x^3)- 6 (x^2)+ 5 x + 12",p4->" \!\(\*FractionBox[SuperscriptBox[\(x\), \(4\)], \(\(8\)\(\\ \)\)]\) - (x^2) + 1",expf->" 3 x \!\(\*SuperscriptBox[\(E\), \(\(-0.5\)\\ x\)]\)",logisticf->"\!\(\*FractionBox[\(2\), \(1\\  + \\ 61\\ \*SuperscriptBox[\(E\), \(\(-1.1\)\\ x\)]\)]\)"}},Delimiter,
{{x0,1,(Subscript[x, 0])},Evaluate@Switch[func,p2,Sequence@@{-1.1,4.9,0.1},p3,Sequence@@{-1.2,3.9,0.1},p4,Sequence@@{-2.8,2.8,0.1},expf,Sequence@@{.02,8.8,0.1},logisticf,Sequence@@{0,7,0.1}],ControlType->LabeledSlider},{{deltax,1,Δx},(10^(-7)),4,0.1,Appearance-> "Labeled"},
SaveDefinitions->True,TrackedSymbols:>Manipulate,AutorunSequencing->{{1,25}},FrameLabel->Row[{HoldForm[m],", the average rate of change"}]]

Instantaneous Rate of Change

The instantaneous rate of change is the rate of change at an instant (hence: instantaneous). It is the same as gradient of the tangent to the curve at a point.

We cannot simply use the gradient equation at the point, as (Subscript[x, 2])-(Subscript[x, 1])=0, and anything divided by 0 is undefined (see demonstration above).

If we construct a tangent line then we can select points on it and use them to find the gradient of the tangent.

Plot[-(((x-4))^2)+16,{x,0,8},ImageSize-> 400,PlotRange-> {0,18},Epilog-> {Red, Dashed,Line[{{4,20},{8,4}}],PointSize[Medium],Point[{6,12}],Blue,Point[{7,8}],Point[{5,16}],Line[{{5,0},{5,16}}],Line[{{0,16},{5,16}}],Line[{{7,0},{7,8}}],Line[{{0,8},{7,8}}]}]

({{({{Instantaneous RoC: m=(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))}, {=((8-16)/(7-5))}, {=((-8)/2)}, {=-4}})}})

We could also have used the original point and under most circumstances we should, as it’s the only accurate point we’d know.

However, getting a tangent line requires us to graph the function and then visually determine a tangent line. This is a very inaccurate way of working.

What we need to do is find another way of determining the gradient, or rate of change, at a point.

Exercises

Graph the functions given and by sketching the tangent determine the gradient at value of x given:

Manipulate[
Pane[Quiz1[NumberOfProblems1],Alignment->{Center,Center}],
{{NumberOfProblems1,9,"number of problems"},{6,9,12},ControlType->RadioButtonBar},
AutorunSequencing->{2},SaveDefinitions->True,
Initialization:>{
Quiz1[probs1_]:=TabView[Table[
allproblems1={
{twostep1,Style[Table[
a1=RandomInteger[{-10,10}];
b1=RandomInteger[{2,3}];
c1=RandomInteger[{-10,10}];
d1=RandomInteger[{-10,10}];
e1=RandomInteger[{-10,10}];
While[And[a1==0],a1=RandomInteger[{-10,10}]];
prob1[i_]:=a1*(x^b1)+c1*x+d1;
{Row[{Style[n1,Blue],".  ",TraditionalForm[temp1=prob1[n1]]," ,  ",Style["x",Italic]," = ",e1}],"   ",Row[{"    ",Style["m",Italic]," = ",D[temp1,x]/. x->e1}]},
{n1,1,probs1}],
14,FontFamily->"Times"],"Gradient of the Tangent"}
};

problist1=Select[allproblems1,(First[#1]==twostep1)&][[1,2]];
title1=Select[allproblems1,(First[#1]==twostep1)&][[1,3]];

Row[{"Form ",CharacterRange["A","Z"][[form1]]}]->TabView[{"Quiz"->Column[{Style[Row[{title1," (Form ",CharacterRange["A","Z"][[form1]],")"}],16,Bold,"Label"],Style[Grid[Partition[Table[problist1[[1,i,1]],{i,1,Length[problist1[[1]]]}],3],Alignment->Left,
Spacings->{"Rows"->{2,{3},0},"Columns"->3}],14,FontFamily->"Times"],""},Spacings->2],
"Answer Key"->Column[{Style[Row[{title1," (Form ",CharacterRange["A","Z"][[form1]],")",Style["  Answer Key",Blue]}],12,Bold,"Label"],Style[Grid[Partition[Table[Column[{problist1[[1,i,1]],Style[problist1[[1,i,3]],Blue]}],{i,1,Length[problist1[[1]]]}],3],Alignment->Left,Spacings->{"Rows"->{1,{2},0},"Columns"->3}],12,FontFamily->"Times"]
},Spacings->2]
}],{form1,1,3}]];
}]

Limits

A solution to our problem comes from a completely different field of mathematics, the study of limits.

A limit is used to define the value a function or series approaches as the dependent variable or term number approaches a certain value.

Examples

Series

Consider the sum of the series of numbers starting at 1 and successively halved, i.e. 1+(1/2)+(1/4)+(1/8)+...

Manipulate[Grid[{c=Table[i,{i,0,count}],N[Sum[1/(2^j),{j,0,c}],7]},Frame->All],{{count,1},1,12}]

The sum approaches 2 as the number of terms approaches infinity. It gets infinitesimally close, but importantly, never reaches it.

Function

Or, consider the function y=(((x^2)-1)/(x-1)). At x=1 the function is undefined, as the denominator will be: 1-1=0. Let’s look at the value of y as x approaches 1.

a={0.9,0.99,0.999,0.9999,1,1.0001,1.001,1.01,1.1};
b=((a^2)-1)/(a-1);
Grid[{a,b},Frame-> All]

Even though the value of the function at x=1 is undefined we can see that the function is approaching 2.

NOTE: We haven’t proved for either of these examples that the limit we’ve determined is in fact correct, merely provided supporting evidence. We aren’t interested in the calculation of limits or the details of limit theory beyond their application to differentiation by first principles, which we’ll look at next.

We use the following symbolism to represent a limit:

({{({{(lim_(x-> 1))}})f(x) = 2}, {The limit of f(x) as x approaches 1 is 2}})

The second example shows us how we can use the concept of a limit to help us find the gradient at a point. If we find the average RoC between two points where one is the point we’re interested in and the other is the point at the limit as x approaches that point, then the points will be infinitesimally close, but not the same. So we can find the gradient between them. (See Demonstration to review)

Differentiation by First Principles

Manipulate[Plot[{(x^2),(((x2^2)-1)/(x2-1)) x -(((x2^2)-1)/(x2-1))+1},{x,0,2.2},PlotRange->{-1,4},ImageSize->{600,300},Epilog-> {Red, PointSize[0.015],Point[{1,(1^2)}],Point[{x2,(x2^2)}],Dashed, Line[{{1,(1^2)},{x2,(x2^2)}}],Blue,Line[{{1,1},{x2,1}}],Line[{{x2,1},{x2,(x2^2)}}],Style[Inset[Row[{"Δ",Style["x",Italic]," = ",x2-1}], {1+(x2-1)/2,0.8}],(x2*8)],Style[Inset["[x, f(x)]",{0.8,1.1}],Italic, 14],Style[Inset[Row[{"[x+Δx, f(x+Δx)]"}],{x2+0.33,(x2^2)-0.07}],Italic, 14]}],{{x2,1.6,"Δx"},1,2,0.01}]

As we reduce the size of Δx the points get closer together and the gradient of the line between them gets closer and closer to the gradient at the point {x, f(x)}.

Note though what happens when Δx is reduced to 0, so we want Δx to approach 0 and get as close to it as possible without being equal to 0.

({{({{So, m=(lim_(Δx->0))(((Subscript[y, 2])-(Subscript[y, 1]))/((Subscript[x, 2])-(Subscript[x, 1])))}, {=(lim_(Δx->0))((f(x+Δx)-f(x))/(x+Δx-x))}, {=(lim_(Δx->0))((f(x+Δx)-f(x))/(Δx))}, {This is often writen with h instead of Δx:}, {=(lim_(h->0))((f(x+h)-f(x))/h)}})}})

This is the formula for differentiation by first principles, also called the derivative. It’s worth noting the our notation for derivatives.
The derivative of function f(x) is usually written f’(x), or its full form is ((Δ f(x))/(Δx)) or ((d f(x))/dx)which is read as “the derivative of f(x) with respect to x”.
For the function y we write y’, ((d y)/dx)or ((Δy)/(Δx)): “the derivative of y with respect to x”.
Δ represents “the change in”, and d is just the English letter for Δ (delta). So, ((Δy)/(Δx)) can also be read as the change in y divided by the change in x, also known as the gradient.

Examples

Find the instantaneous rate of change by first principles of the function y=(x^2)+3x+4 at x=2.

({{({{((d y)/dx)=(lim_(h->0))(((((x+h))^2)+3(x+h)+4-((x^2)+3x+4))/h)}, {=(lim_(h->0))(((x^2)+ 2x h + (h^2)+3x+3h+4-(x^2)-3x-4)/h)}, {=(lim_(h->0))(( 2x h + (h^2)+3h)/h)}, {=(lim_(h->0)) 2x+h+3}, {=2x+3}, {∴ at x=2:}, {((d y)/dx)=2×2+3}, {=7}})}})

Find the derivative by first principles of the function y=2(x^3)-4x+12.

({{({{((d y)/dx)=(lim_(h->0))((2(((x+h))^3)- 4(x+h) + 12 - (2(x^3)- 4x + 12))/h)}, {=(lim_(h->0))((2((x^3)+3(x^2)h + 3x (h^2)+(h^3))-4x-4h + 12 - (2(x^3)- 4x + 12))/h)}, {=(lim_(h->0))((2(x^3)+6(x^2)h + 6x (h^2)+3(h^3)-4x-4h + 12 - 2(x^3)+ 4x - 12)/h)}, {=(lim_(h->0))((6(x^2)h + 6x (h^2)+ (h^3)-4h )/h)}, {=(lim_(h->0))6(x^2)+6x h+(h^2)-4}, {=6(x^2)-4}})}})

A particle is travelling such that its displacement (s), in metres, from its starting point is given by the equation y=-4(t^2)+2t+5. What is its velocity (v), in (ms^(-1)) of the particle at t=3s?

The velocity is the derivative of displacement:

({{({{((d s)/dt)=(lim_(h->0))((-4(((t+h))^2)+ 2(t+h) + 5 - (-4(t^2)+ 2t + 5))/h)}, {=(lim_(h->0))((-4(t^2)-8t h + 4(h^2)+ 2t + 2h + 5+ 4(t^2)- 2t - 5)/h)}, {=(lim_(h->0))((-8t h + 4(h^2)+ 2h)/h)}, {=(lim_(h->0))-8t+4h+2}, {=-8t+2}, {at t=3:}, {v=-8×3+2}, {=-22(ms^(-1))}})}})

Note : Velocity is a vector quantity, so the negative simply indicates direction.

Exercises

Find the instantaneous rate of change at x using differentiation by first principles:

Manipulate[
Pane[Quiz2[NumberOfProblems2],Alignment->{Center,Center}],
{{NumberOfProblems2,9,"number of problems"},{6,9,12},ControlType->RadioButtonBar},
AutorunSequencing->{2},SaveDefinitions->True,
Initialization:>{
Quiz2[probs2_]:=TabView[Table[
allproblems2={
{twostep2,Style[Table[
a2=RandomInteger[{-10,10}];
b2=RandomInteger[{2,3}];
c2=RandomInteger[{-10,10}];
d2=RandomInteger[{-10,10}];
e2=RandomInteger[{-10,10}];
f2=RandomInteger[{1,2}];
g2=RandomInteger[{-10,10}];
While[And[a2==0],a2=RandomInteger[{-10,10}]];
prob2[i_]:=a2*(x^b2)+c2*(x^f2)+d2*x+g2;
{Row[{Style[n2,Blue],".  ",TraditionalForm[temp2=prob2[n2]]," ,  ",Style["x",Italic]," = ",e2}],"   ",Row[{"    ",Style["m",Italic]," = ",D[temp2,x]/. x->e2}]},
{n2,1,probs2}],
14,FontFamily->"Times"],"Differentiation"}
};

problist2=Select[allproblems2,(First[#1]==twostep2)&][[1,2]];
title2=Select[allproblems2,(First[#1]==twostep2)&][[1,3]];

Row[{"Form ",CharacterRange["A","Z"][[form2]]}]->TabView[{"Quiz"->Column[{Style[Row[{title2," (Form ",CharacterRange["A","Z"][[form2]],")"}],16,Bold,"Label"],Style[Grid[Partition[Table[problist2[[1,i,1]],{i,1,Length[problist2[[1]]]}],3],Alignment->Left,
Spacings->{"Rows"->{2,{3},0},"Columns"->3}],14,FontFamily->"Times"],""},Spacings->2],
"Answer Key"->Column[{Style[Row[{title2," (Form ",CharacterRange["A","Z"][[form2]],")",Style["  Answer Key",Blue]}],12,Bold,"Label"],Style[Grid[Partition[Table[Column[{problist2[[1,i,1]],Style[problist2[[1,i,3]],Blue]}],{i,1,Length[problist2[[1]]]}],3],Alignment->Left,Spacings->{"Rows"->{1,{2},0},"Columns"->3}],12,FontFamily->"Times"]
},Spacings->2]
}],{form2,1,3}]];
}]

Power Rule

You’re probably getting sick of solving derivatives by first principles. It’s long, involving and easy to make simple errors.

Let’s have a look at some of the derivatives we’ve found so far:

Style[Grid[{{"f(x)","-4(t^2)+2t+5","2(x^3)-4x+12","(x^2)+3x+4"},{"f'(x)","-8t+2","6(x^2)-4","2x+3"}},Frame-> All,Alignment->Left],Italic]

What similarities can you see between the values of the functions and their derivatives?

The Power Rule

If y=a (x^n), then ((d y )/dx)= a n (x^(n-1))
If y=c, then ((d y)/dx)=0

It’s also important to know that if a function is the sum of two or more functions, i.e. f(x)=g(x)+h(x), then f'(x)=g'(x)+h'(x).

So, f(x)=3(x^2)-5x+1 can be viewed as g(x)=3(x^2), h(x)=-5x, i(x)=1.

({{({{∴f'(x)=3×2×(x^(2-1))+-5×1×(x^(1-1))+0}, {=6x-5}})}})

Examples

Find the derivative of y=-3(x^4)+5(x^2)-8x

({{({{y'=-3×4(x^(4-1))+5×2x-8}, {=-12(x^3)+10x-8}})}})

Find the gradient of f(x)=5(x^2)+3(x^3)+7 at x=4

({{({{f'(x)=5×2(x^(2-1))+3×3(x^(3-1))+0}, {=10x+9(x^2)}, {at x=4:}, {f'(x)=10×4+9×(4^2)}, {=40+144}, {=184}, {∴m=184}})}})

Find the derivative of y=2(((x-3))^2)-4

({{This isn't in the form y=a (x^n)}}), so first expand the function:

({{({{y=2((x^2)-6x+9)-4}, {=2(x^2)-12x+14}, {y'=2×2(x^(2-1))-12(x^(1-1))+0}, {=4x-12}})}})

Exercises

Apply the Power Rule to the following functions to determine the derivative function:

Manipulate[
Pane[Quiz3[NumberOfProblems3],Alignment->{Center,Center}],
{{NumberOfProblems3,9,"number of problems"},{6,9,12},ControlType->RadioButtonBar},
AutorunSequencing->{2},SaveDefinitions->True,
Initialization:>{
Quiz3[probs3_]:=TabView[Table[
allproblems3={
{twostep3,Style[Table[
a3=RandomInteger[{-10,10}];
b3=RandomInteger[{2,3}];
c3=RandomInteger[{-10,10}];
d3=RandomInteger[{-10,10}];
e3=RandomInteger[{-10,10}];
f3=RandomInteger[{1,2}];
g3=RandomInteger[{-10,10}];
While[And[a3==0],a3=RandomInteger[{-10,10}]];
prob3[i_]:=a3*(x^b3)+c3*(x^f3)+d3*x+g3;
{Row[{Style[n3,Blue],".  ",TraditionalForm[temp3=prob3[n3]]}],"   ",Row[{"    ",Style["(dy/dx)",Italic]," = ",D[temp3,x]}]},
{n3,1,probs3}],
14,FontFamily->"Times"],"Power Rule"}
};

problist3=Select[allproblems3,(First[#1]==twostep3)&][[1,2]];
title3=Select[allproblems3,(First[#1]==twostep3)&][[1,3]];

Row[{"Form ",CharacterRange["A","Z"][[form3]]}]->TabView[{"Quiz"->Column[{Style[Row[{title3," (Form ",CharacterRange["A","Z"][[form3]],")"}],16,Bold,"Label"],Style[Grid[Partition[Table[problist3[[1,i,1]],{i,1,Length[problist3[[1]]]}],3],Alignment->Left,
Spacings->{"Rows"->{2,{3},0},"Columns"->3}],14,FontFamily->"Times"],""},Spacings->2],
"Answer Key"->Column[{Style[Row[{title3," (Form ",CharacterRange["A","Z"][[form3]],")",Style["  Answer Key",Blue]}],12,Bold,"Label"],Style[Grid[Partition[Table[Column[{problist3[[1,i,1]],Style[problist3[[1,i,3]],Blue]}],{i,1,Length[problist3[[1]]]}],3],Alignment->Left,Spacings->{"Rows"->{1,{2},0},"Columns"->3}],12,FontFamily->"Times"]
},Spacings->2]
}],{form3,1,3}]];
}]

Chain Rule

We looked at the example of y=2(((x-3))^2)-4 in the last section and solved it by first expanding and then applying the Power Rule.

This is fine for a quadratic and even possibly a cubic, but at any powers beyond this expanding gets messy. Again, there’s an easier way, the Chain Rule.

The Chain Rule applies to any composite function, but for this year we will only consider it in relation to factorised polynomials.

The Chain Rule

If y=f(u), where u=f(x) ... [in other words if y is a composite function]
then ((d y)/dx)=((d y)/du)×((d u)/dx)

Example

Find the derivative of y=(((2x+4))^3)

({{({{Let u=2x+4}, {∴y=(u^3)}, {((d y)/du)=3(u^2)}, {((d u)/dx)=2}, {So, ((d y)/dx)=((d y)/du)×((d u)/dx)}, {=3(u^2)×2}, {=6(((2x+4))^2)}})}})

Find the derivative of y=4(((-3(x^2)+1))^5)-7

({{({{Let u=-3(x^2)+1}, {∴y=4(u^5)-7}, {((d y)/du)=5×4×(u^(5-1))+0}, {=20(u^4)}, {((d u)/dx)=2×-3×(x^(2-1))+0}, {=-6x}, {So, ((d y)/dx)=((d y)/du)×((d u)/dx)}, {=20(u^4)×-6x}, {=-120x (((-3(x^2)+1))^4)}})}})

A way to help remember the Chain Rule is: derivative of the inside × derivative of the outside.

Exercises

Apply the Chain Rule to the following functions to determine the derivative function:

Manipulate[
Pane[Quiz4[NumberOfProblems4],Alignment->{Center,Center}],
{{NumberOfProblems4,9,"number of problems"},{6,9,12},ControlType->RadioButtonBar},
AutorunSequencing->{2},SaveDefinitions->True,
Initialization:>{
Quiz4[probs4_]:=TabView[Table[
allproblems4={
{twostep4,Style[Table[
a4=RandomInteger[{-10,10}];
b4=RandomInteger[{2,9}];
c4=RandomInteger[{-10,10}];
d4=RandomInteger[{-10,10}];
e4=RandomInteger[{-10,10}];
f4=RandomChoice[{1,1,2}];
While[And[a4==0],a4=RandomInteger[{-10,10}]];
prob4[i_]:=a4*(((e4 (x4^f4)+c4))^b4)+d4;
{Row[{Style[n,Blue],".  ",TraditionalForm[temp4=prob4[n]]}],"   ",Row[{"    ",Style["(dy/dx)",Italic]," = ",D[temp4,x]}]},
{n,1,probs4}],
14,FontFamily->"Times"],"Chain Rule"}
};

problist4=Select[allproblems4,(First[#1]==twostep4)&][[1,2]];
title4=Select[allproblems4,(First[#1]==twostep4)&][[1,3]];

Row[{"Form ",CharacterRange["A","Z"][[form4]]}]->TabView[{"Quiz"->Column[{Style[Row[{title4," (Form ",CharacterRange["A","Z"][[form4]],")"}],16,Bold,"Label"],Style[Grid[Partition[Table[problist4[[1,i,1]],{i,1,Length[problist4[[1]]]}],3],Alignment->Left,
Spacings->{"Rows"->{2,{3},0},"Columns"->3}],14,FontFamily->"Times"],""},Spacings->2],
"Answer Key"->Column[{Style[Row[{title4," (Form ",CharacterRange["A","Z"][[form4]],")",Style["  Answer Key",Blue]}],12,Bold,"Label"],Style[Grid[Partition[Table[Column[{problist4[[1,i,1]],Style[problist4[[1,i,3]],Blue]}],{i,1,Length[problist4[[1]]]}],3],Alignment->Left,Spacings->{"Rows"->{1,{2},0},"Columns"->3}],12,FontFamily->"Times"]
},Spacings->2]
}],{form4,1,3}]];
}]

Applications of Rates of Change: Motion

Scalar and Vector Quantities

Firstly, we need to address the nature of different quantities. A scalar quantity only has a magnitude. Distance and speed are scalar quantities, the direction of movement is irrelevant. A vector quantity has both magnitude and direction. Displacement and velocity are vector quantities. The distinction between scalar and vector quantities is probably best seen through an example:

The square path shown below has side lengths of 1 metre.  If I walk from the blue dot to the red dot following the black path I’ve travelled a distance of 2m. My displacement however is the length of the red dashed line, (Sqrt[2])m. If I walk the whole way around the square I’ve walked a distance of 4m, but my displacement is 0m. This is because the direction is important and when we walk 1m up this is cancelled out by walking 1m down (+1-1=0). Moving 1m left is also cancelled out by moving 1m right.

Graphics[{EdgeForm[Black],White,Rectangle[{0,0},{1,1}],Blue,PointSize[Large],Point[{1,0}], Red, Point[{0,1}],Dashed,Line[{{0,1},{1,0}}]},ImageSize->100]

When we talk about distance then the related rate of change is speed and for displacement the related rate of change is velocity. Acceleration is the rate of change of velocity or speed, but is always a vector.

Vectors form an important part of the Mathematics C course, but for Mathematics B we only look at their direction in situations where we have + and - directions.

Both distance and displacement, and especially speed and velocity, are used interchangeably in everyday language. But it’s important to remember what they actually mean.

Units of Measurement

Distance and displacement are measured in metres (m).

Speed and velocity are measured in metres per second (m/s or (ms^(-1))).	Note: Speed and velocity are rates... the rate of change of distance or displacement.

Acceleration is measured in meters per second per second (m/(s^2) or (ms^(-2)))

Displacement - Time Graph

The graph below shows the height from the ground of an object launched straight up into the air. Travelling up is the positive direction, so down is the negative.

Plot[-(((0.5x-2))^2)+4,{x,0,8},AxesLabel->{"Time (s)","Displacement (m)"} ,Epilog-> {Red, Dashed, PointSize[Medium],Point[{1,1.75}],Point[{4,4}],Line[{{1,1.75},{4,4}}], Green, Line[{{1,1.75},{6,3}}],Point[{6,3}]}]

e.g. 1. The red dashed line shows the change in height from t=1s to t=4s. The object has travelled from a height of 1.75m to that of 4m during this time. Find its average speed and velocity over this time.

({{({{∴ speed=((Δ distance)/(Δ time))}, {=((4-1.75)/(4-1))}, {=0.75 (ms^(-1))}, {velocity=((Δ displacement)/(Δ time))}, {=((4-1.75)/(4-1))}, {=0.75 (ms^(-1))}})}})

Because the object only travelled in the one direction (up) during the time considered there is no difference between the distance and displacement nor the speed and velocity.

e.g. 2. The green dashed line shows the change in height from t=1s to t=6s. The object travelled from a height of 1.75m to that of 4m and then back to 3m during this time. Find its average speed and velocity over this time.

({{({{Δ distance=(4-1.75)+(4-3)=3.25m}, {∴ speed=((Δ distance)/(Δ time))}, {=(3.25/5)}, {=0.65(ms^(-1))}, {Δ displacement=3-1.75=1.25m}, {velocity=((Δ displacement)/(Δ time))}, {=(1.25/5)}, {=0.416667 (ms^(-1))}})}})

Velocity - Time Graphs

Let' s look again at the displacement - time graph. This time I’ve included the function of the line.

Plot[-(((0.5x-2))^2)+4,{x,0,8},AxesLabel->{"Time (s)","Displacement (m)"} ,Epilog-> {Red, Style[Inset["d(t)=-(0.5t-2)^2+4"],Italic,16]}]

Now the velocity is the rate of change of displacement, which we also know is the gradient and therefore the derivative.

({{({{Let u=0.5t-2}, {y=-(u^2)+4}, {(dy/du)=-2u}, {(du/dx)=0.5}, {(dy/dx)=(dy/du)×(du/dx)}, {=0.5×-2u}, {=-u}, {=-(0.5t-2)}, {=-0.5t+2}})}})

So, the velocity - time graph looks as such:

Plot[-0.5x+2,{x,0,8},AxesLabel->{"Time (s)","Velocity (m/s)"} ,Epilog-> {Red, Style[Inset["v(t)=-0.5t+2",{5.5,0.35}],Italic,16]}]

At t=0 we have a high positive velocity, at t=4 we have 0 velocity and at t=8 we have a high negative velocity.

Have a look again at the Demonstration and see how the gradient of the function changes as we follow the function from left to right.

Putting the two graphs in line as shown below should help you to see the connection as well:

Plot[-(((0.5x-2))^2)+4,{x,0,8},AxesLabel->{"Time (s)",Style["Displacement (m)",16]} ,Epilog-> {Red, Style[Inset["gradient(velocity) at points",{3.95,1.8}],Italic,16],Inset["2",{0.5,0.5}],Inset["-2",{7.5,0.5}],Inset["1",{2,2.75}],Inset["-1",{6,2.75}],Inset["0",{4,3.5}],Purple, Line[{{3,4},{5,4}}],Line[{{0,0},{0.5,1}}],Line[{{1.5,2.5},{2.5,3.5}}],Line[{{5.5,3.5},{6.5,2.5}}],Line[{{7.5,1},{8,0}}]}]

Plot[-0.5x+2,{x,0,8},PlotStyle->Purple,AxesLabel->{"Time (s)",Style["Velocity (m/s)",16]} ,Epilog-> {Red, Style[Inset["velocity at points",{4,1.5}],Italic,16],Inset["2",{0.3,1.6}],Inset["-2",{8,-1.75}],Inset["1",{2,0.75}],Inset["-1",{6,-0.75}],Inset["0",{4,0.3}]}]